﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Xml.Serialization;

namespace NinjaToolbox.SubComponentModule.Internal
{
    public struct SubComponentInfo
    {
        public SubComponentBase SubComponent { get; set; }

        public ISubComponent SubComponentCachedInterface { get; set; }

        public bool LastIsOnEnabled { get; set; }

        public bool IsAwaked { get; set; }

        public bool IsStarted { get; set; }

        public bool IsValid { get { return SubComponent != null; } }

        public void ChangeToStaticSubComponent()
        {
            IsAwaked = true;
            IsStarted = true;
            LastIsOnEnabled = true;
        }
    }
}
